import java.util.Scanner;

public class towork5 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String temp="LANQIAO";
        int sum=0;
        for (int i=0;i<s.length() ;i++ )
        {
            if(s.charAt(i)==temp.charAt(sum)){
                sum++;
            }
            if(sum==temp.length()){
                System.out.println("YES");
                return;
            }
        }
        System.out.println("NO");

    }
}
